package stu.day33_day38.day37;

public class hw2 {



    public int[] singleNumber(int[] nums) {
        int n = nums.length;
        int num = 0;
        int x1=0;
        int x2=0;
        for (int i = 0; i < n; i++) {
             num ^= nums[i];
            }

        num=num&(-num);

        for (int i = 0; i < n; i++) {
            if((nums[i]&num)==0){
                x1 ^= nums[i];
            }else {
                x2 ^= nums[i];
            }
        }

        return new int[]{x1,x2};



    }

    public static void main(String[] args) {
        System.out.println(18%3);
        System.out.println(7<<2);
    }






}
